﻿<%@ Page Title="Work Order Details" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="View_WO.aspx.cs" Inherits="admin_View_WO" %>

<asp:Content ID="Head" ContentPlaceHolderID="head" runat="Server">
    <link href="../styles/admin.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <div id="top_menu">
        <div id="help_button">
            help
        </div>
                                <div id="logout">
            <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutPageUrl="../Default.aspx"
                OnLoggingOut="LoginStatus1_LoggingOut" />
        </div>
    </div>
    <div id="page_title">
        ADMINISTRATION
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="left_content">
        <div class="menu">
            <ul>
                <li><a href="Home.aspx">Home</a></li>
                <li><a href="Mng_Client.aspx">Manage Clients</a></li>
                <li><a href="Mng_Site.aspx">Manage Sites</a></li>
                <li><a href="Mng_Machine.aspx">Manage Machines</a></li>
                <li><a href="Mng_Comp.aspx">Manage Components</a></li>
                <li><a href="Mng_Report.aspx">Manage Report</a></li>
                <li><a href="#" class="current">View Work Order</a></li>
                <li><a href="Mng_FaultsRecom.aspx">Manage Faults Recommendation</a></li>
            </ul>
        </div>
    </div>
    <!-- end of left content -->
    <div id="right_content">
        <div class="content_area">
            <h2>
                Work Orders Details
            </h2>
            <div class="form_box1">
                <asp:FormView ID="FormViewWorkOrders" runat="server" AllowPaging="True" DataKeyNames="workorder_id"
                    DataSourceID="WorkOrdersObjectDataSource" OnPreRender="FormViewWorkOrders_PreRender">
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td class="label">
                                    Work Order Reference No:
                                </td>
                                <td>
                                    <asp:Label ID="workorder_reference_noLabel" runat="server" Text='<%# Bind("workorder_reference_no") %>'
                                         CssClass="fields"  />
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Machine:
                                </td>
                                <td>
                                    <asp:Label ID="machine_idLabel" runat="server" Text='<%# Bind("machine_id") %>'  CssClass="fields"  />
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Date Submitted:
                                </td>
                                <td>
                                    <asp:Label ID="date_submittedLabel" runat="server" Text='<%# Bind("date_submitted", "{0:d}") %>'  CssClass="fields" />
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Description:
                                </td>
                                <td class="label">
                                    <asp:Label ID="descriptionLabel" runat="server" Text='<%# Bind("description") %>' CssClass="fields" />
                                </td>
                            </tr>
                            <tr>
                                <td class="label">
                                    Action:
                                </td>
                                <td>
                                    <asp:Label ID="actionLabel" runat="server" Text='<%# Bind("action") %>' CssClass="fields" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td class="Li_buttonC">
                                    <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                                        Text="Delete" OnClientClick='return confirm("Are you sure you want to delete this entry?");' />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <PagerStyle CssClass="pager" />
                </asp:FormView>
                <asp:ObjectDataSource ID="WorkOrdersObjectDataSource" runat="server" DeleteMethod="Delete"
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByMachineID"
                    TypeName="DataAccess.i2iPortalTableAdapters.WorkOrdersTableAdapter">
                    <DeleteParameters>
                        <asp:Parameter Name="Original_workorder_id" Type="Int32" />
                    </DeleteParameters>
                    <SelectParameters>
                        <asp:QueryStringParameter Name="machine_id" QueryStringField="machine_id" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
        <asp:LinkButton ID="BakckButton" runat="server" PostBackUrl="Mng_WO.aspx" CssClass="backbtn">back</asp:LinkButton>
        <!-- end of right content -->
    </div>
</asp:Content>
